/*
 * Mutex.cpp
 *
 *  Created on: Feb 14, 2012
 *      Author: hzheng
 */

#include "Mutex.h"
#include <pthread.h>

namespace NS_LCD_AFW
{

CMutex::CMutex()
{
	pthread_mutex_init(&m_mutex, NULL);
}

CMutex::~CMutex()
{
	pthread_mutex_destroy(&m_mutex);
}

int CMutex::lock()
{
	return pthread_mutex_lock(&m_mutex);
}
int CMutex::unLock()
{
	return pthread_mutex_unlock(&m_mutex);
}

} /* namespace NS_LCD_AFW */
